import tensorflow as tf

a = tf.random.normal([4, 28, 28, 3])
print(a)
print(a.shape)
print(a.ndim)

aa = tf.reshape(a, [4, 784, 3])
print(aa.shape)
print(aa.ndim)

aaa = tf.reshape(a, [4, -1])
print(aaa.shape)
print(aaa.ndim)

aaaa = tf.reshape(aaa, [4, 28, 28, 3])
print(aaaa.shape)
print(aaaa.ndim)

b = tf.random.normal([4, 3, 2, 1])
print(b)
print(b.shape)
print(b.ndim)

bb = tf.transpose(b)
print(bb)
print(bb.shape)
print(bb.ndim)

bbb = tf.transpose(b, perm=[0, 1, 3, 2])
print(bbb.shape)
print(bbb.ndim)

c = tf.random.normal([4, 35, 8])
print(c.shape)
print(c.ndim)

cc = tf.expand_dims(c, axis=0)
print(cc.shape)
print(cc.ndim)

ccc = tf.expand_dims(c, axis=3)
print(ccc.shape)
print(ccc.ndim)
